Cocktail Help Reference
NavigateToAsync(Type,Action<Object>) Method
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > INavigator Interface > NavigateToAsync Method : NavigateToAsync(Type,Action<Object>) Method



viewModelType
The target ViewModel type.
prepare
An action to initialize the target ViewModel before it is activated.

Glossary Item Box

Asynchronously navigates to an instance of the provided ViewModel type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.

Syntax

Visual Basic (Declaration) 
Overloads Function NavigateToAsync( _
   ByVal viewModelType As Type, _
   ByVal prepare As Action(Of Object) _
) As Task
Visual Basic (Usage)Copy Code
Dim instance As INavigator
Dim viewModelType As Type
Dim prepare As Action(Of Object)
Dim value As Task
 
value = instance.NavigateToAsync(viewModelType, prepare)
C# 
Task NavigateToAsync( 
   Type viewModelType,
   Action<object> prepare
)
C++/CLI 
Task^ NavigateToAsync( 
   Type^ viewModelType,
   Action<Object^>^ prepare
) 

Parameters

viewModelType
The target ViewModel type.
prepare
An action to initialize the target ViewModel before it is activated.

Return Value

A System.Threading.Tasks.Task to await completion.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.